package com.qingke.xml;

import java.util.List;
import java.util.Map;

public class XmlParserSample {

	public static void main(String[] args) {
		long start = System.currentTimeMillis();
		
		List<Map<String, String>> domList = DomService.readXML("sample.xml", "student");
		System.out.println(domList.size());
		System.out.println("Parse the xml by dom in" + (System.currentTimeMillis() - start) + "mm");
		
		start = System.currentTimeMillis();
		List<Map<String, String>> saxList = SaxService.readXML("sample.xml", "root");
		System.out.println(saxList.size());
		System.out.println("Parse the xml by sax in" + (System.currentTimeMillis() - start) + "mm");
	}

}
